package com.sangmo.fts.basic.model;

import com.sangmo.boot.framework.data.entity.general.LongEntity2;
import com.sangmo.boot.framework.data.filter.meta.Filtered;
import com.sangmo.boot.framework.data.json.meta.ExtView;
import com.sangmo.boot.framework.data.json.meta.One;
import com.sangmo.fts.common.authority.Rights;
import com.sangmo.fts.common.authority.meta.UserAnn;
import com.sangmo.fts.user.model.User;

import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "file_upload")
@ExtView
public class FileUpload extends LongEntity2 {

    @One(src = "createdBy", value = "creator", target = User.class, fieldset = {"name"})
    @Filtered
    private String refType;
    @Filtered
    private String refNo;
    private long size;
    @Filtered
    private String fileName;
    private String url;
    private String description;

    public String getRefType() {
        return refType;
    }

    public void setRefType(String refType) {
        this.refType = refType;
    }

    public String getRefNo() {
        return refNo;
    }

    public void setRefNo(String refNo) {
        this.refNo = refNo;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
